home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / dobat.zip / DOBAT.C next >
C/C++ Source or Header  |  1988-03-18  |  364b  |  24 lines

  1. #include <process.h>
  2. #include <string.h>
  3. main(argc,argv)
  4. int    argc;
  5. char    *argv[];
  6.  
  7. {    char    command[132];
  8.     int    i;
  9.  
  10.     if(argc<2){
  11.         printf("usage:  %s batchfilename parameters\n",argv[0]);
  12.         exit(1);
  13.     }
  14.     strcpy(command,argv[1]);
  15.     if(argc>2){
  16.         for(i=2;i<argc;i++){
  17.             strcat(command," ");
  18.             strcat(command,argv[i]);
  19.         }
  20.     }
  21.     system(command);
  22. }
  23.     
  24.